package com.healthcloud.shiro;

import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;

/**
 * Created by xiam on 2015/6/22.
 */
public interface ExpiredCache<K, V> extends Cache<K, V> {

    /**
     * Adds a Cache entry.
     *
     * @param key   the key used to identify the object being stored.
     * @param value the value to be stored in the cache.
     * @param expired expired time
     * @return the previous value associated with the given {@code key} or {@code null} if there was previous value
     * @throws CacheException if there is a problem accessing the underlying cache system
     */
    V put(K key, V value, long expired) throws CacheException;
}
